======Getting Started======
Pedal Board requires a clear internal eeprom at first boot. \\ 
To clear your internal eeprom hold bank up and bank down while Pedal Board starts up.

=====Pedal Box Mode=====
Pedal Box mode is designed to add up to 8 controller pedals and an LCD display to a floorboard / midi device (namely guitar modellers) combination.

====Pedals====
   * Scales between the min and max value \\ 
   * Displays either:
      * a meter of approx position, some events will display 'off' when 0 and/or 'on' when 127. 
      * A named value (eg. 'Ping/Pong Delay' for an effect select control).
   * Pedals can not be mapped to program change, on/off or tap events.
   * Pedals can have different settings for each program change, or can be fixed to the same event regardless of program change.


====MIDI Input====
Pedal Box displays incoming midi messages that are listed in the event table, the information displayed depends on the event type.

This allows a floorboard to provide input to pedal box, the display reacts the same as if the floorboard's midi messages were buttons/pedals connected (like for Pedal Board).

====Hooking it all up====
===Separate floorboard===
//eg. Behringer FCB1010 Floorboard and a Behringer V-Amp Pro.//
  * Midi Merger should be ON

  * Connect the MIDI out of you floorboard into Pedal Box
  * Connect the MIDI out of Pedal BoX into your midi device.


===Combined Floorboard===
//eg. Boss GT8//
  * Midi Merger should be OFF
 

  * Connect the MIDI out of Pedal BoX into your midi device.
  * Connect the MIDI out of your device into Pedal BoX
 


====Setup Modes====
**Event Setup mode** \\ 
Event setup mode allows you to set the midi message, as well min and max values for scaling. \\ 
It's activated by a pre defined midi command (defined in main.h). CC127 on channel 1, with a value of 127 is the default.

The first screen sets the midi event, using any pedal you can scroll through the event map, and select the desired event. \\ 
{{mcrozier:pbx_event_setup_screen_1p.jpg}} \\ 

Sending the screen change midi event (defined in main.h), will bring you to screen 2, where you first set the low value, and after sending the screen change event again, you can set the high value. \\ 
{{mcrozier:pbx_event_setup_screen_2pe.jpg}} \\ 

The 3rd screen allows to select the device that should be used. Up to 8 devices can stored on 8 banksticks. \\ 
{{mcrozier:pbx_event_setup_screen_3p.jpg}} \\ 
Moving any pedal will select the device. If a bankstick is not present 'BS Not Available' will be displayed.

At this point you can send the event setup midi command again to save the settings, or send screen change again to return to setup screen 1.

**Global settings** \\ 
Each pedal has the option of being set to a fixed midi event, or can have different setting for each program change (event, min and max all included).

The AIN setup screen allows to select which are fixed, and which are not. It's accessed by sending the AIN setup midi event (defined in main.h). \\ 
{{mcrozier:pbx_ain_setup_screen.jpg}} \\ 

Moving a pedal all the way to the on position will set it to be fixed (1). Moving a pedal to the off position will set it to follow program changes (0).

Sending the screen change MIDI event takes you to the bankstick channel select. Here you can set the channel of each device loaded into your banksticks. If no bankstick is present 'NA' is displayed \\ 
{{http://members.iinet.net.au/~mcrozier/images/pbx_bs_setup_screena.jpg|}} \\ 
Moving any pedal will change the channel for the selected bankstick - '>' marks the selected. Each time you send the screen change midi event the next bankstick will be selected. 

Send the Global setup midi event again to save and exit.






=====Pedal Board Mode=====
Pedal Board Mode is designed to... well, i'm sure you get it!

====Pedals====
   * Scales between the min and max value \\ 
   * Displays either:
      * a meter of approx position, some events will display 'off' when 0 and/or 'on' when 127. 
      * A named value (eg. 'Ping/Pong Delay' for an effect select control).
   * Pedals can not be mapped to program change, on/off or tap events.
   * Pedals can have different settings for each program change, or can be fixed to the same event regardless of program change.


====Buttons====
Fixed buttons always output the same MIDI command regardless of bank.

Banked buttons gives you up to 128 midi commands, It's recommended to use these for program changes.

Buttons have 4 main types of events for buttons - Normal, On/Off only, Program Change or Tap Tempo.  
==Normal==
   * Toggles between the min and max value \\ 
   * Can be switching or momentary \\ 
   * LED indicator is off when at min value, on when at max value 
   * Displays either:
      * a meter of approx position, some events will display 'off' when 0 and/or 'on' when 127. 
      * A named value (eg. 'Ping/Pong Delay' for an effect select control) 

==On/Off only==
   * Toggles between 0 and 127, regardless of min/max value \\ 
   * Can be switching or momentary \\ 
   * LED indicator is off when at 0, on when at 127
   * Displays 'On' or 'Off' 

==Program Chnage==
   * Only sends the Status byte, and Parameter 1 byte
   * Is momentary only, regarless of setting
   * LED indicator lights up on the button assigned to the current program change
   * Displays the program change name.

==Tap Tempo==
   * Sends the preset tap tempo midi event, with a value of 127 on down press. \\ 
   * Momentary only (regardless of setting) \\ 
   * LED indicator is on when button down, off when button is up.
   * Displays approximate BPM \\ 
<sup>This is only a guide calculated by Pedal Board, your device may calculate a slightly different BPM</sup>


====MIDI Input====
Pedal Board displays incoming midi messages that are listed in the event table, the information displayed depends on the event type.

This allows a floorboard to provide input to Pedal Board, the diplay reacts the same as if the midi messages were buttons/pedals connected directly.

====Hooking it all up====
    *MIDI merger should be OFF

   * MIDI out of Pedal Board to MIDI in of your device
   * MIDI out of your device to MIDI in of Pedal Board






====Setup mode====
**Event setup** \\ 
Setup mode is activated by pressing holding bank down and pressing the event setup button (pin defined in main.h)
The last pedal moved, or button pressed in selected.
There are 2 programming screens. You can move between them with the bank up button.

In the first screen,
Moving any pedal connected will scroll the event list, select the desired event. \\ 
{{mcrozier:pbx_event_setup_screen_1.jpg}} \\ 
Multiple pedals/buttons can be set to the same event.

Pressing the bank up button, you get to screen 2;
For each pedal and button (and banked button) a minimum and maximum value can be specified. \\ 
With buttons, the min and max are toggled \\ 
With pedals, the value is scaled between the min and max. \\ 
{{mcrozier:pbx_event_setup_screen_2b.jpg}} \\
First select the low value with any pedal or pot, and press the bank up button. Now you can adjust the high value.
Pressing the event setup button will toggle buttons between momentary and switching modes. \\ 
Low and high values can be set to the same value.

The 3rd screen allows to select the device that should be used. Up to 8 devices can stored on 8 banksticks. \\ 
{{mcrozier:pbx_event_setup_screen_3b.jpg}} \\ 
Moving any pedal will select the device. If a bankstick is not present 'BS Not Available' will be displayed.

From here you can bank up to go back to screen 1.

Pressing bank down at any time saves settings and exits setup mode.

**Global settings** \\ 

Access by holding bank down and pressing the Global setup button (defined in main.h) \\ 
Each pedal has the option of being set to a fixed midi event, or can have different setting for each program change (event, min and max all included).

This screen allows to select which are fixed, and which are not. \\ 
{{mcrozier:pbx_ain_setup_screen.jpg}} \\ 
Moving a pedal all the way to the on position will set it to be fixed (1). Moving a pedal to the off position will set it to follow program changes (0).

Pressing bank up takes you to the bankstick channel select screen. Here you can set the channel of each device loaded into your banksticks. If no bankstick is present 'NA' is displayed \\ 
{{mcrozier:pbx_bs_setup_screenb.jpg}} \\ 
Moving any pedal will change the channel for the selected bankstick - '>' marks the selected. Each time you press bank up the next bankstick will be selected. 

Press bank down to save and exit.




====== Creating Device Files ======

FIXME

=====Event Handlers=====
The display and MIDI handling is dependant on the event definition. \\ 
There are 9 types:
^Handler         ^Button MIDI      ^Pedal MIDI ^LED                  ^LCD 2nd line                                              ^
|Program Change  |Guess...         |N/A        |Marks Current        |Device Name                                                    |
|On / Off Only   |Toggle 0/127     |N/A        |0 = off 127 = on     |On or Off                                                 |
|Tap Tempo       |127              |N/A        |On when pressed      |Tempo in BPM                                              |
|Value           |Toggle Low/High  |Scale Low - High|Low = off High = on  |value (decimal)                                           |
|Meter Only      |Toggle Low/High  |Scale Low - High|Low = off High = on  |approx. position meter                                    |
|Meter Off       |Toggle Low/High  |Scale Low - High|Low = off High = on  |approx. position meter w/"off" when at 0                  |
|Meter On Off    |Toggle Low/High  |Scale Low - High|Low = off High = on  |approx. position meter w/"off" when at 0 and "On" when at 127|
|Meter Pan       |Toggle Low/High  |Scale Low - High|Low = off High = on  |approx. pan style meter                                   |
|Use Map #       |Toggle Low/High  |Scale Low - High|Low = off High = on  |value map (9 available)                                   |

The event handler for each midi event is pre defined in the event map.

Pedals can not be mapped to event types of the first three.

LCD first line is always the event name listed in the event map.
